<?php
/* @var $this PrinterController */
/* @var $model Printer */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'printer-form',
	// Please note: When you enable ajax validation, make sure the corresponding
	// controller action is handling ajax validation correctly.
	// There is a call to performAjaxValidation() commented in generated controller code.
	// See class documentation of CActiveForm for details on this.
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'Brand'); ?>
		<?php echo $form->textField($model,'Brand',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'Brand'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'Model'); ?>
		<?php echo $form->textField($model,'Model',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'Model'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'Serial_num'); ?>
		<?php echo $form->textField($model,'Serial_num',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'Serial_num'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'unit_price'); ?>
		<?php echo $form->textField($model,'unit_price'); ?>
		<?php echo $form->error($model,'unit_price'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'Ink_id'); ?>
		<?php // echo $form->textField($model,'Ink_id'); ?>
		
		<?php echo $form->dropDownList($model, 'Ink_id', CHtml::listData(
		Ink::model()->findAll(), 'id', 'model'),
		array('prompt' => '')
		); ?>
		
		<?php echo $form->error($model,'Ink_id'); ?>
		
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->